You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5 KiB

2 months ago
import "../globals.css";
import React from "react";
import { MainNav } from "../../components/MainNav";
import { Footer } from "../../components/Footer";
import { getMainNav } from "../../lib/data";
export const dynamicParams = true;
export async function generateStaticParams() {
return [{ locale: "zh-CN" }, { locale: "en" }];
}
1 month ago
export async function generateMetadata({ params }: { params: { locale: string } }) {
const locale = params.locale;
const isEn = locale === "en";
return {
title: isEn
1 month ago
? "Henggan Intelligence | Precision Imaging — Leading a New Era of Vision"
: "衡感智能:让城市具备安全感知能力",
1 month ago
description: isEn
1 month ago
? "Founded in November 2014, Henggan Intelligence is a leading intelligent imaging system provider in China. We deliver end-to-end on-device intelligent imaging solutions."
: "衡感智能(成立2014)提供芯片级适配、ISP调试与算法优化的端到端智能影像解决方案,服务手机、车载、医疗与可穿戴等行业。",
1 month ago
};
}
2 months ago
export default function RootLocaleLayout({ children, params }: { children: React.ReactNode; params: { locale: string } }) {
const mainnav = getMainNav(params.locale);
return (
1 month ago
<html lang={params.locale === "en" ? "en" : "zh-CN"}>
1 month ago
<body className="bg-[#f6f8fc] text-[#1e2a3f]">
2 months ago
<MainNav items={mainnav} basePath={`/${params.locale}`} locale={params.locale} />
1 month ago
<main className="pt-16 md:pt-24 min-h-screen">{children}</main>
2 months ago
<Footer locale={params.locale} />
</body>
</html>
);
}